Kolmogorov compression complexity may differentiate different schools of Orthodox iconography

The complexity in the styles of 1200 Byzantine icons painted between 13th and 16th from Greece, Russia and Romania was investigated through the Kolmogorov algorithmic information theory. The aim was to identify specific quantitative patterns which define the key characteristics of the three different painting schools. Our novel approach using the artificial surface images generated with Inverse FFT and the Midpoint Displacement (MD) algorithms, was validated by comparison of results with eight fractal and non-fractal indices. From the analyzes performed, normalized Kolmogorov compression complexity (KC) proved to be the best solution because it had the best complexity pattern differentiations, is not sensitive to the image size and the least affected by noise. We conclude that normalized KC methodology does offer capability to differentiate the icons within a School and amongst the three Schools.


Comparison between Kolmogorov Complexity (KC) analysis by its absolute values and normalized values.
Analyzed images do not have the same resolution because of the different size of the paintings. For this reason, as KC depends on the image size, its actual values of are not informative. Thus, we used absolute and normalized values of to compare KC using 11 sets of 8-bit grayscale images. Figure 1 highlights the need for image normalization, whereby1a and 1b show that without normalization, KC is dependent on the image resolution. An image size of 1024 × 1024 yielded 200-300% larger values compared to the 512 × 512 size, although the content and complexity of the images were the same. In contrast, the normalized KC values differed only by 0-30%. Furthermore, KC normalization also ensured that values were between 0 and 1, and that differences deriving from image resolution are small ( Fig. 1c-f).
For further validation, we generated two images with the Inverse FFT algorithm and fractal dimension of 2.5 and lowest (281 × 1000 pixels) (Fig. 2a) and the highest resolution (1000 × 1000 pixels) resolution (Fig. 2b) of the icons in our analysis. Figure 2c shows the usefulness of this correction, as well as the ability of KC to eliminate the bias imposed by different resolutions of the images subjected to fractal analysis. These results based on FS images and KC suggested that KC was an appropriate method to analyze the three sets of images with Byzantine icons of the three schools of church paintings. After normalization, the results were comparable for all the 1200 icons.
It is therefore proposed that without normalization KC would present very large differences between resolutions, even exceeding 200-300%. With the normalization there are still differences in resolution, but our images do not differ much in resolution. Thus, as can be seen in Fig. 2, KC presents very close values for images at different resolution 281 × 1000 versus 1000 × 1000 pixels which makes us consider that for our sets of icons KC can be suitable in quantifying visual complexity. Figure 3 shows that KC can be used for analysis of inverse FFT and MD generated images, as well as 16-bit and RGB grayscale images, where other fractal or entropy approaches have low relevance (see the supplementary material).

Kolmogorov Complexity analysis of FS images in 16-bit and RGB grayscale at different resolutions.
Concerning the methodology of using artificially generated FS images it may appear that artificially generated FS images have no structure or pattern visually close to the paintings, in lieu of the generated images which show visual complexity that increases from those generated with algorithm with FD = 2.0 to 3.0. In fact, these artificial images have structure / pattern visually close to the paintings and are compatible to the paintings and with fractal dimensions close to the paintings. The effectiveness of our methodology has been tested on three Normalized KC analysis of the three sets of icons. Figure 4a shows the average KC values for each of the three groups of 400 icons. Romanian icons showed the highest complexity, due to the increased saturation of colors, and the strongest contrast, with more shades of colors. KC values without and with normalization for Romanian and Russian schools are shown in Fig. 4b. Even if the compositions of the Romanian icons were simpler in their geometric structure, stylized, reduced to the essential, but with many symbols taken from tradition, which determined higher complexity (Fig. 4c). In contrast, Russian iconographers emphasized complex geometric structures and used sober colors, which prompted interiorization; this is due to the strong emphasis on the practice of hesychasm. Due to the approach towards contemplation and asceticism, the Russian iconographers formed in this sense a special chromatic modality with all the colors being grayed, and transparent backgrounds from successive washings and brush vibrations. For these reasons, the KC of the Russian icons is lower than that of the Romanian ones (Fig. 4d). Figure 4b shows the difference in KC, with and without normalization, between the two extreme icons. It is observed that without normalization the difference is smaller.  Greek icons are possibly a consequence of their technique which involved mixing all colors with a little ocher, yellow and gold, while matte backgrounds were repeated at least two times. Techniques with tinted washers were also used, arranged in light areas or shades in addition to classic lighting (Fig. 4a). To see the effects of KC normalization in image analysis, we present results with and without normalization the two icons with a resolution of 547 × 1000, belonging to the Romanian school (Fig. 4c) and with a resolution of 817 × 1000, belonging to the Russian school (Fig. 4d).
Noticeable is the small changes in mean KC values and their significant contrasting the three groups is worth of attention. The variations occur in the second decimal because all 1200 icons have KC between 0.5 and 1 and normalized KC has values only between 0 (monochromatic image) and 1 (pure noise).
The We consider that the problem is not from the methodology but from the thematic heterogeneity of the icons of the 3 sets. For these reasons, we analyzed the 4 case studies in the next step.
The existence of small differences between the 3 groups analyzed is due to the very high heterogeneity of the biblical scenes described or of the saints painted in icons. Thus, the median of the Romanian icon set is 0.78, 0.75     Fig. 9a-c). The analysis has shown that the style differences between the three schools were confirmed at the level of specific composition, the most complex being the Romanian ones, followed by the Greek and Russian ones. The icon of The Crucifixion of Jesus best displays the graphic, chromatic and technical differences presented previously (Fig. 8d), but these are also noticeable in the other three iconographic compositions (Fig. 6d, 7d, 9d); in those Figures the fractal correspond to only one icon per school. Our results indicate that the Romanian icons clearly highlight the particularities of chromatic complexity, which is computationally quantifiable and also visible to the naked eye.

Discussion
Earlier investigations of making use of KC in various areas have produced interesting results. Our methodology and results extend this statistics to further directions and assessments focused on painted icons, with a brief discussion and correlation to earlier works. Here we have introduced the normalized Kolmogorov Complexity as the classification tool of Byzantine icons from the three schools of religious painting: Greek, Russian and Romanian. In the first stage, entropy and nine fractal parameters were tested: Logical depth (LD), Differential Box-Counting (Db_DBC), Relative Differential Box-Counting (Db_RDBC), Pyramid Dimension Gradient-PGM method (Dp_Gradient PGM), Minkowski Dimension-Blanket method (Dm_Blanket), Fractal FFT Dimension using Discrete Fourier Transformation (Df), Higuchi Dimension 1D (Dh), Higuchi 2D-KfoldDiff method (Dh-KfoldDiff) and Kolmogorov Complexity (KC) (see Supplementary material). The analyses were performed on 1100 grayscale images generated by the Midpoint Displacement (MD) and Inverse Fast Fourier Transformation (FFT) algorithms, at resolutions ranging from 128 × 128 to 2048 × 2048 pixels. Twenty images were generated for MD and FFT, respectively, for 11 classes of fractal dimension set to: 2.0 (minimum complexity), 2.1, 2.2, …, 3.0 (maximum complexity).
It was necessary to perform the size-normalization of the images because the analyzed images differed in size and shape. All fractal and entropy analyses showed sensitivity to image size. Large differences in Kolmogorov Complexity between images with different resolution were resolved by normalization. Kolmogorov's complexity had the smallest differences in fractal dimension among the 20 images in the 11 classes analyzed and was also the least sensitive to the effects of salt and pepper and noise alteration.
Gruia et al. 22 used Kolmogorov Complexity to investigate the spatial behavior of the dynamics of the economy in the Development Region of Bucharest-Ilfov in Romania. Thereby, they highlighted models of spatial dynamics of colored maps that helped to understand the sustainable economic development of regions. Their study demonstrated the usefulness of this method for exceeding the current methodological limits in analyzing the dynamics of territorial reality. Their color gradient maps were turned into grey tones of the number of employees and the turnover in five classes. In Gruia et al. 22 the analyzed images were the same size and the 5 revenue classes www.nature.com/scientificreports/ for creative economies, created after the division of turnover values (in Ron), had the same chroma for each class with no chromatic alteration. In our study, we analyzed 1100 artificially generated images but also 1200 images of Byzantine icons with differences in size and degree of degradation due to their age. While Gruia et al., analyzed only dynamics of financial turnovers, in the current study we show that the Kolmogorov complexity is also useful in identifying patterns. The use of fractal analysis in analysis of paintings is not new. There have been several fractal and non-fractal approaches. Milanović and Tomić 10 examined the existence of fractal patterns in Byzantine iconography. They proved that fractality is manifested in descending mode (apparent information, corresponding to the content of icon) and ascending mode (hidden causal information, corresponding to the self-organizing spatiality). Our study confirmed that Byzantine icons can be analyzed by fractal analysis and has revealed that, for a set of icons depicting the same scene, different complexities can be identified between the three analyzed schools.
Forsythe et al. 11 used fractal analysis to explain the beauty perceived by an observer by measuring the visual complexity between natural and abstract images. These authors used GIF compression to approximate visual complexity and by combining it with the fractal dimension, they were able to explain the variability of judgments of the beauty perceived in art. They also indicated that if color is removed from the painting, viewers were unable to make meaningful judgments about its beauty. In comparison, we showed that KC indicates greater Kim et al. 5 investigated the three quantitative measures of images: brightness, use of individual colors, as well as color variety for the ten historical periods of art. They found a difference in color use, consistent with historical circumstances and a reduced variety of colors in the medieval period. They also showed that physical degradation through oxidation and corrosion suffered can generate bias in the analysis of old paintings. Based on this observation, we tested KC on artificially generated images with FFT and MD algorithms, to which degradation filters such as Gaussian noise and salt and pepper noise were applied. From the analysis of original and altered images, we noticed that KC exhibits approximately similar values, indicating that degradation from age produced negligible bias in the analysis of Byzantine icons.
Bratitsi et al. 23 classified ancient ceramic shreds of unknown origin by analysis of their color indices on the chromatic scale (RGB). Though based on only RGB the differentiation of objects from color provides a general clue but includes uncertainties; hence a more sophisticated classification and attribution method is needed. Our study proves the satisfactory test regarding KC to quantifying patterns for 16-bit grayscale or RGB color www.nature.com/scientificreports/ images, and moreover compared the complexity of the artwork and managed to differentiate from which school of Byzantine painting an icon originated, with the provision that the icon indicates the same biblical moment. Mureika et al. 24 in 2005 used multifractal analysis to study the abstract expressionist artwork by different artists and showed that the blobs method can distinguish paintings belonging to different artists from the same artistic school. Also, Murieka et al. 2 in 2010 used multifractal analysis to show that differences in fractal characters of paintings can be identified by examining indicators of the artist's physiology. We set out to find a technique for identifying an iconographic school based on the style differences approached and Kolmogorov Complexity t, for at least the four case studies, grouped the icons from the three schools.
Taylor et al. 7 showed that Pollock refined over time his dripping technique by using fractal box-counting analysis. An increase in fractal dimension was thereby identified from 1.0 for paintings in 1943 when he used a single coat of paint, to 1.72 for paintings from 1952 for paintings with multiple coats. In 2002 Taylor et al. 8 showed that Pollock succeeded in creating complex fractal patterns through this technique. Oancea and Rapa 9 performed a series of fractal analyses on Pollock's paintings using box-counting, and identified the complexity of his works of art. In our current study, we used the normalization of the Kolmogorov Complexity because the icons had different degrees of degradation and different sizes. We showed that for the same types of Byzantine icons the complexity increased from the oldest Greek school to the Romanian school, the newest of the three www.nature.com/scientificreports/ schools analyzed. The higher complexity values of the Romanian Byzantine icons may be due not only to the more pronounced chromatic contrast, but also to the improvement of techniques or the adoption of some elements of detail from the other two pre-existing Byzantine painting schools. Sigaki et al. 1 analyzed 140,000 paintings made during a period of 1 millennium in art history by analyzing the entropy of permutation and statistical complexity. They showed that different artistic styles present different values of entropy and complexity, allowing hierarchical organization and grouping by styles. Shamir 3 analyzed Pollock's original paintings obtained by his revolutionary technique of dripping paint on the horizontal canvas with other painting styles used by various painters who tried to imitate his style. This analysis showed that in 93% of cases, they could identify the Pollock's artworks. De la Calleja and Zenit 4 analyzed the complexity of abstract paintings by calculating the Betti number and demonstrated that Pollock's paintings are superior to the abstract paintings of other artists who imitated his style. In our study we only aimed to analyze the Byzantine icons from the three schools and not the differences between the painters. Subsequent studies will show whether the Kolmogorov Complexity can distinguish between painters.
Regarding the use of human perceptual measures such as visual complexity, cognitive complexity or others, instead of KC, as well as, the link between 'visual/perceptual/qualitative' feel of the paintings and the quantitative nature of these measures, this has been of concern. In fact, a multifractal analysis is questionable, because www.nature.com/scientificreports/ it would assume more than one range of scaling. Digital images have only a limited range of scales (3 may be 4), so the linear part in a double log plot can only be searched for these 3 to 4 decades (essentially only 3 to 4 points in the double log plot). Dividing this limited range into even smaller ones does not make sense and is meaningless. In the present work, the deviation from the linear part does not show the multi fractality, but the deviation from mono fractality, especially for paintings with a lot of non-fractal shapes. At any rate, there could always be a better parameter and the list of possible measures is quite long. In the present endeavor the best parameter, that of KC turned out to be a promising and good parameter for this study. Even after normalization, the KC values vary from ~ 0.2 to ~ 0.65 (Fig. 1f) and referring to Fig. 4a, the differences between the mean KC values for the three groups of paintings (Greek, Romanian, Russian) seem low. The main cause is the heterogeneity of the themes (scenes) of the icons. These close KC values is not an undesirable result caused by the methodology but due to the thematic heterogeneity of the icons of the 3 sets. For these reasons, we analyzed the 4 case studies regarding different scenes.
That the Kolmogorov complexity had the smallest differences in fractal dimension among the 20 images in the 11 classes analyzed and was also the least sensitive to the effects of salt and pepper and noise alteration, no mathematical explanation can be given for this. However, the mathematical connection between Kolmogorov complexity and fractal dimension is not simple. Both can be interpreted as parameters that measure the content of complexity in an image, but both parameters do this in a different mathematical way.

Conclusion
The presented fractal analysis is a useful tool in differentiating iconographic schools, each painting school having its own theological vision and emerging mathematical concept 25 . The KC normalization of the FS generated images showed that the increase in complexity was directly proportional to the increased fractal dimension. This holds true for different image resolutions. In this way, databases can be created with archetypal patterns that can quickly and accurately identify the unknown origin to the school and individual artist for paintings owned by institutions such as auction houses, private collections, and art museums.
From a practical point of view, this technical approach has an indisputable utility in recognition of some schools, starting from certain models and calculation of indicators that measure complexity. It should be emphasized that the method proposed in the present study does not claim to exhaust the mystery of the contemplation of the icon by methods related to technical rationality. Especially in the context of today's information society, with an overly technical mentality, it is important to recognize the spiritual view of reality presented by the icons. Obviously, this perspective does not cancel the effort of an analytical rationality, but it is fundamental to understand that spiritual feelings transmitted by the icons cannot be seen and acquired through algorithms.
KC can be a fast and useful tool in differentiating complexity and can be useful not only in iconography or in the analysis of works of art but also in classifying patterns in various fields such as medicine, biology, landscape ecology, remote sensing, geology, economic data spatialization [26][27][28][29][30][31] .
The described KC analysis and normalization could be used to investigate geographical routes followed by some iconic painters, which might be a valuable information on the cultural influences throughout history. The method proposed here might be applied in various fields based on its advantage of comparing images at different resolutions.

Methods
Entropy and nine fractal parameters were employed in the exploration of the 1200 byzantine icon images, as well as artificially generated fractal surface (FS) images, to validate our methodology.

Generating test images.
To validate the proposed approach, we generated 5 × 11 sets of generated images with fractal surfaces using an Inverse FFT algorithm and fractal dimensions between 2.0 and 3.0. The grey scale values of a digital image represent a surface, a topological two-dimensional object that more or less fills the third dimension. Thus, the fractal dimensions of gray-scale images are in the range of two (minimum complexity) and three (maximum complexity). The generated test images were therefore also generated in this range. In any way, the painting on canvas is made by pigments and a paintbrush, thus produce an oftentimes perceptible relief. This together with the geometrical image provide 2 < FD < 3. Yet in a 2D image the FD can be even < 1; but since in our case we allow unlimited resolution, and everything is made of pixels, which have fractal dimension 2, the chosen 2 < FD < 3 is justified. Image resolutions were: 128 × 128, 256 × 256, 512 × 512, 1024 × 1024, and 2048 × 2048. Finally, each set contained 20 images. All images were generated in 8-bit grayscale, to compare the results of the proposed method with other fractal or non-fractal approaches (Fig. 10) (see the Supplementary material).
Because the icons to be analyzed had image resolutions between 281 × 1000 and 1000 × 1000 pixels, two images were generated with the same fractal dimension of 2.5 and with resolutions of 281 × 1000 and 1000 × 1000 pixels (Fig. 11).
Subsequently, these two images were altered by adding Gaussian noise with standard deviation (SD) 25, 50, 75, and 100 or by adding salt and pepper noise to test the ability of fractal or entropy analyses not robust against noise (Fig. 12). We used Gaussian noise and salt-and-pepper noise additively, since these two types of noise are the most common. In painting images, the multiplicative noise is not applicable, as it refers to an unwanted random signal that gets multiplied into some relevant signal during capture, transmission, or other processing, e.g. radar imagery. That is, it depends on the status of the system. For additive each pixel in the noisy image is the sum of the true pixel value and a random, Gaussian distributed noise value. Therefore, from the above rationale these noises were chosen. A more detailed investigation of different types of noise would be interesting but is far beyond the scope of this paper. Such a test was necessary because some icons were degraded and exhibit noise in their structure. To test the ability of KC to quantifying patterns for16-bit grayscale or RGB color images, two images with a resolution such as the smallest and largest icon (281 × 1000 and 1000 × 1000 pixels, respectively) were generated, using the Inverse FFT and the Midpoint Displacement (MD) algorithms (Fig. 13).
Image acquisition and preprocessing. Icons were photographed with a digital camera (Nikon D60 digital camera, 18/55 VR lens, RAW format) mounted on a camera tripod (ZOMEI 55" Compact Light Weight Travel Portable Folding SLR Camera Tripod). Mostly original icons were photographed. A small number was taken from the electronic archives available on the Internet of some museums, collections or specialty albums. The details of the acquisition of the icon image sources are in the supplementary material. The RGB color images were converted to 8-bit grayscale using open-source software ImageJ 1.53 32 , and the resulting images were normalized using open-source software IQM 3.5-Histogram Modification-Normalization, with low and high offset 0.00% 19 . The conversion of the images to 8-bitgrayscale was necessary in order to be able to compare the proposed approach with the established methods of fractal and non-fractal analyses of image texture which rely on 8-bit images.   20 . This definition is a theoretical concept that cannot be solved in an exact way. It is not decidable if the actual version of the program is really the accurate one, thus estimates of the KC must be implemented, particularly for digital images. Writing a program to generate an object in a digital image might be feasible in some cases, but generally, it is simply not possible to do this. However, a reasonable approach is to take the amount of memory needed for a lossless compressed image as an estimate for the KC of that image 33 . It should be noted that compression is not a new trend and is affiliated to the entropy, e.g. the greater the Shannon entropy, say in bits, then the more random it looks. In contrast, the KC is the algorithmic complexity meant to quantify the algorithmic randomness. When an object cannot be compressed beyond its uncompressed length, the object is algorithmically random 34 . Lossless compression algorithms are well investigated and optimized for digital images, e. g. PNG lossless image compression or ZIP compression of any file type. We opted in our analysis to use the PNG algorithm. PNG compression was chosen because the details of the algorithm are well known and corresponding implementations are very fast in the analysis and are freely available. We would like to point out that Zenil 34 has presented the calculation of Kolmogorov complexity with the coding theorem method CTM and the block decomposition method BDM 34 . These two algorithms offer the advantage that the Kolmogorov complexity can be computed more accurately, but unfortunately the technical effort is significantely higher. For this empirical study, the estimation via PNG compression turned out to be sufficient.
The 1200 icons, not having a close shape, yielded digital images at different resolutions: the smallest image had a resolution of 281 × 1000, and the largest 1000 × 1000. Unfortunately, the actual resolution affects the Kolmogorov complexity. Thus, with the same complexity, low resolution icons have a lower KC value than high  www.nature.com/scientificreports/ resolution icons. Bringing the images to the same resolution could only be done by scaling an image in length or width, or by cropping. However, that would distort the image, and thus produce even greater bias in quantifying KC, becoming useless in the classification of patterns in the end. However, this bias was successfully eliminated by normalization, i.e. the ratio of KC to the image size in Mb, according to Eq. (1).
where KC is the Normalized Kolmogorov Complexity, KC X is Kolmogorov Complexity un-normalized (in MB) and S is image size (in MB). Without normalization KC would present very large differences between resolutions (Fig. 1a,b). Normalization solves this impediment. There are still differences in resolution, but analyzed icons do not differ much in resolution. Thus, as can be seen in Fig. 2 of the manuscript, KC presents very close values for images at different resolution 281 × 1000 versus 1000 × 1000 pixels which makes us consider that for our sets of icons KC can be suitable in quantifying visual complexity.
Normalization KC allowed the quantification of complexity with values between 0 and 1, regardless of the image size. The value 0 is recorded when the image is uncomplicated, all pixels have the same gray value, and 1 is reached when each pixel is surrounded by the 8 neighbors with different gray values. As the value increases, so does the pixel inhomogeneity.
The relevance of the method used was tested by comparing the results obtained with those obtained by nine well-known fractal and non-fractal algorithms, using IQM 3.5: Logical depth, Differential Box-Counting, Relative Differential Box-Counting, Pyramid Dimension, Minkowski Dimension, FFT Dimension, Higuchi Dimension 1D, Higuchi Dimension 2D and Entropy [35][36][37][38][39][40] . KC proved to be the most relevant and fastest of the algorithms used. The comparative analysis is presented in the supplementary material.